Learn R Programming

terra (version 0.5-2)

head and tail: Show the head or tail of a Spat* object

Description

Show the head (first values) or tail (last values) of a SpatRaster or of the attributes of a SpatVector.

Usage

head(x, ...) 
tail(x, ...)

Arguments

x

SpatRaster or SpatVector

...

additional arguments passed on to other methods

Value

matrix (SpatRaster) or data.frame (SpatVector)

See Also

show, geom

Examples

Run this code
# NOT RUN {
r <- rast(nrow=25, ncol=25)
values(r) <- 1:ncell(r)
head(r)
tail(r)
# }

Run the code above in your browser using DataLab